Skip to content

allow abort event on htmx.ajax requests - #3944

Open
MichaelWest22 wants to merge 1 commit into
bigskysoftware:four-devfrom
MichaelWest22:ajax-abort
Open

allow abort event on htmx.ajax requests#3944
MichaelWest22 wants to merge 1 commit into
bigskysoftware:four-devfrom
MichaelWest22:ajax-abort

Conversation

@MichaelWest22

Copy link
Copy Markdown
Collaborator

Description

htmx.ajax requests can not be aborted with htmx:abort event because this listener is only setup on active htmx elements and not on elements used as the source of a manual ajax api call. To allow aborting of these we need to lazy load the abort listener during the issue request instead.

Corresponding issue:
#3937

Testing

Added a ajax abort test

Checklist

  • I have read the contribution guidelines
  • I have targeted this PR against the correct branch (master for website changes, dev for
    source changes)
  • This is either a bugfix, a documentation update, or a new feature that has been explicitly
    approved via an issue
  • I ran the test suite locally (npm run test) and verified that it succeeded

@MichaelWest22 MichaelWest22 added the htmx 4 Issues specific to htmx version 4 label Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

htmx 4 Issues specific to htmx version 4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant